package com.hao.order.app.model.dto;

import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author haoge
 * @version 1.0
 * @date 2023/5/23 19:04
 */
@Data
public class CreateOrderRequest implements Serializable {
    private static final long serialVersionUID = 4864245187128994762L;

    /**
     * 用户id
     */
    @NotNull
    @Min(value = 1)
    private Long userId;

    /**
     * 商品id
     */
    @NotNull
    @Min(value = 1)
    private Long productId;

    /**
     * 商品数量
     */
    @NotNull
    @Min(value = 1)
    private Integer productCount;

    /**
     * 商品单价
     */
    @NotNull
    @Min(value = 0)
    private Double price;



}
